﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Chapter02.ViewModel
{
    using System.IO;
    using System.Windows;
    using System.Windows.Markup;

    public class Factory
    {
        public static Window NewWindow(string xamlFile)
        {
            Window window;
            using (FileStream fs = new FileStream(xamlFile, FileMode.Open))
            {
                window = (Window)XamlReader.Load(fs);
            }
            return window;
        }
    }
}
